import React  from 'react';

// 游戏组件组件
export default class Films extends React.Component{

  state = {
    list:[]
  }
  componentDidMount() {

    this.setState({
      list: [{'id':'01','name': '黑神话悟空'},{'id':'02','name': '诛仙'},{'id':'03','name': '梦幻西游'},{'id':'04','name': '和平精英'},{'id':'05','name': '魔兽世界'},{'id':'06','name': '红色警戒'}]
    });

  }

  render() {
    console.log("render");
    return (
      <div>
        <div> 游戏列表 </div>
          <ul>
            {this.state.list.map((item) => (
              <li key={item.id}>{item.name}</li>
            ))}
          </ul>
      </div>
    );
  }

}


